package com.wbp.cms.qatest.dao;

import javax.annotation.Resource;

import org.junit.Test;

import com.wbp.cms.client.project.domain.ContractDO;
import com.wbp.cms.core.project.dao.ContractDAO;
import com.wbp.cms.qatest.BaseTest;


/**
 * @Description: 
 * @Department:
 * @author andy.lhc
 * @date 2016年3月11日 下午10:52:13 
 */
public class ContractDAOTest extends BaseTest{

  @Resource
  private ContractDAO  contractDAO ; 
  
   @Test
   public  void test_insert(){
     
     ContractDO  contractDO =new ContractDO();
     contractDO.setProjectId(2L);
     contractDO.setUserName("lihc-test22");
     contractDO.setComments("test-common2");
     contractDO.setMobileNumber("1897756452470");
     contractDO.setDetailAddress("浙江杭州test2222.....");
     contractDO.setIdCardImage1("http://1111111//222222.png");
     contractDO.setSignImage1("singimage1....");
     System.out.println( contractDAO.insert(contractDO) >0 ) ;
   }
   
   @Test
   public void test_update(){
     ContractDO  contract = this.contractDAO.load(1L) ; 
     if(contract !=null){
         contract.setComments("test----------");
         contract.setSignImage1("sign1");
         contract.setSignImage2("sign2");         
         System.out.println( this.contractDAO.update(contract) >0 ) ;
     }
   }
   
   
   
   
}
